package com.woniu.park.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.woniu.park.controller.form.BalanceForm;
import com.woniu.park.controller.form.ParkspaceForm;
import com.woniu.park.entity.Order;
import com.baomidou.mybatisplus.extension.service.IService;
import com.woniu.park.entity.User;
import com.woniu.park.util.PageResult;
import com.woniu.park.util.Result;

import java.util.List;
import java.util.Map;

import java.util.Date;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author cxb
 * @since 2020-09-05
 */
public interface IOrderService extends IService<Order> {

    public Result bookingSpace(BalanceForm balanceForm);

    public Result cancellationOrder(int userId);

    public PageResult queryHistory(int pageIdx, int pageSize, int userId);

    Order unfinishedOrder(int userId);

    boolean send(String phoneNum, String templateCode, Map<String,Object> code);

    public IPage<Order> pageQuery(int pageIdx, int pageSize, int orderParkspaceId, Date orderSpacerecordTimeStart,Date orderSpacerecordTimeEnd);

    int insertOrder(int userId, double parseMoney, String parkspaceId,int stoppingTime);
}
